home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 25 / Cream of the Crop 25.iso / bbs / con_005c.zip / CONCORD.RAR / SCRIPT.RAR / READMSG.SCR < prev    next >
Text File  |  1997-04-25  |  1KB  |  42 lines

  1. ; READMSG.SCR : Example script file to read messages on certain area.
  2. ;
  3. ; By default, not called from anywhere; you should add
  4. ; a Run Script menutype yourself to some menu to use
  5. ; this script file.
  6. ;
  7. ; Give message area number as parameter to this script.
  8.  
  9. PARAM %WHICHAREA% = NUMBER
  10. VAR %OLDAREA% = NUMBER
  11. VAR %SEL%     = NUMBER
  12. VAR %FROM%    = NUMBER
  13. IF (%WHICHAREA% <> 0)
  14.   ; temporarily change area to wanted message area
  15.   SET %OLDAREA% = @MAREA_NUM@
  16.   MENUTYPE 2006 %WHICHAREA%
  17. END
  18. ; Ask to read messages
  19. WRITE "^C14,0;Read (~1F)orward, (~2R)everse, (~3N)ew? ^W;^M;"
  20. SET %SEL% = @ANSWER@
  21. IF (%SEL% = 1)
  22.   SET @DEFAULT_ANSWER@ = 1
  23.   WRITE "^C14,0;From msg num (1-@MAREA_MAX@) : ^C15,1;^L5;^C14,0;^M;"
  24.   SET %FROM% = @ANSWER@
  25.   IF ((%FROM% < 1) OR (%FROM% > @MAREA_MAX@))
  26.     WRITE "^C12,0;Invalid msg num!^M;"
  27.   ELSE
  28.     MENUTYPE 2008 /FORWARD /JUMP:%FROM%
  29.   END
  30. END
  31. IF (%SEL% = 2)
  32.   MENUTYPE 2008 /REVERSE
  33. END
  34. IF (%SEL% = 3)
  35.   MENUTYPE 2008 /NEW
  36. END
  37. IF (%WHICHAREA% <> 0)
  38.   ; go back to old msg area
  39.   MENUTYPE 2006 %OLDAREA%
  40. END
  41. QUIT
  42.